package com.example.rabbitmq.consumer;

import com.example.rabbitmq.config.Confirmconfig;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @Date 2021/7/21 20:38
 * @Created by wangle
 * @Description  报警消费者
 */
@Slf4j
@Component
public class waring_consumer {

    @RabbitListener(queues = Confirmconfig.waring_queue)
    public  void  receiverswaring(Message message){
        String msg=new String(message.getBody());
        log.info("报警发现不可用路由消息{}",msg);

    }

}
